package com.cherrish.demo.common.util;

/**
 * @author cherrish
 * @time 2018-10-30 17:10
 * @name StringUtils
 * @desc:
 */
public class StringUtils {

    public static boolean isBlank(CharSequence cs){
        int strLen;
        if (cs != null && (strLen = cs.length()) != 0) {
            for(int i = 0; i < strLen; ++i) {
                if (!Character.isWhitespace(cs.charAt(i))) {
                    return false;
                }
            }

            return true;
        } else {
            return true;
        }
    }
    public static boolean isEmpty(CharSequence cs) {
        return cs == null || cs.length() == 0;
    }
}
